import service from "../request";


// 登录
export function user_login( payload = {} ){
    return service.post('/api/user/login',payload)
}
//注册
export function user_register( payload = {} ){
    return service.post('/api/user/register',payload)
} 
//角色列表
export function role_list( payload = {} ){
    return service.get('/api/role/list', { params: payload } );
}

//=============================出差申请
//出差申请 列表查询
export function business_list( payload = {} ){
    return service.get('/api/business/list', { params: payload } );
}
//出差申请 添加
export function business_add( payload = {} ){
    return service.post('/api/business/add',  payload );
}
//出差申请 删除
export function business_delete(payload = {}){
    return service.post('/api/business/delete', payload )
}
//出差申请 导入
export function business_import(payload = {}){
    return service.post('/api/business/import', payload )
}
//出差申请 导出
export function business_download(payload = {}){
    return service.get('/api/business/download', {params:payload} )
}

//==============================外勤打卡
//外勤打卡 列表查询
export function outside_list(payload = {}){
    return service.get('/api/outside/list', {params:payload})
}
//外勤打卡 添加
export function outside_add(payload = {}){
    return service.post('/api/outside/add', payload)
}
//外勤打卡 删除
export function outside_delete(payload = {}){
    return service.post('/api/outside/delete', payload)
}
//外勤打卡 导入
export function outside_import(payload = {}){
    return service.post('/api/outside/import', payload)
}
//外勤打卡 导出
export function outside_download(payload = {}){
    return service.get('/api/outside/download', {params:payload})
}

//========================================请假申请
//请假申请 列表查询
export function leave_list (payload = {}){
    return service.get('/api/leave/list',{params:payload})
}
//请假申请 添加
export function leave_add (payload = {}){
    return service.post('/api/leave/add',payload)
}
//请假申请 删除
export function leave_delete (payload = {}){
    return service.post('/api/leave/delete',payload)
}
//请假申请 导入
export function leave_import(payload = {}){
    return service.post('/api/leave/import', payload)
}
//请假申请 导出
export function leave_download(payload = {}){
    return service.get('/api/leave/download', {params:payload})
}

//=======================================加班申请
//加班申请 列表查询
export function work_list(payload = {}){
    return service.get('/api/work/list',{params:payload})
}
//加班申请 添加
export function work_add(payload = {}){
    return service.post('/api/work/add',payload)
}
//加班申请 删除
export function work_delete(payload = {}){
    return service.post('/api/work/delete',payload)
}
//加班申请 导入
export function work_import(payload = {}){
    return service.post('/api/work/import', payload)
}
//加班申请 导出
export function work_download(payload = {}){
    return service.get('/api/work/download', {params:payload})
}
 


